{include file="header.html"}

<div class="page-header">
	<h6>
		优惠劵管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			手动为会员发放优惠劵
		</small>
	</h6>
</div>
<div class="row">
	<div class="col-xs-12">
		<form class="form-horizontal" role="form" method="post" action="?app=coupon&act=grant" enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="in_shop">是否发放给所有会员</label>
				<div class="col-sm-10">
					<div class="radio">
						<label>
							<input type="radio" name="all" value="2" class="ace yes" />
							<span class="lbl">是</span></label>
					</div>
					<div class="radio">
						<label>
							<input type="radio" name="all" value="1" checked class="ace no" />
							<span class="lbl">否</span></label>
					</div>
				</div>
			</div>
			<div class="form-group member_id">
				<label class="col-sm-2 control-label no-padding-right" for="member_id">会员id</label>
				<div class="col-sm-10">
					<input type="text" id="member_id" name="member_id" value="" class="col-xs-2" />
					<span style="color: red;margin-top: 2px;position: relative;top: 5px;">（如需发放多个会员id，请在后面加上逗号 : 1,2,3）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-right" for="coupon_id">请选择优惠劵</label>
				<div class="col-sm-2">
					<select name="coupon_id" id="coupon_id" class="form-control" style="width:220px;">
						<option value="">请选择优惠劵</option>
						{foreach from=$coupon item=g}
						<option value="{$g->id}">{$g->name}，面值{if $g->coupon_money<0}全额{else}￥{$g->coupon_money}{/if}</option>
						{/foreach}
					</select>
				</div>
			</div>

			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info" type="submit">
						<i class="ace-icon fa fa-check bigger-110"></i>
						提交
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset">
						<i class="ace-icon fa fa-undo bigger-110"></i>
						重置
					</button>
				</div>
			</div>
		</form>
	</div>
</div>

{include file="footer.html"}
<script>
    $(function(){
        $('.selectpicker').selectpicker({ isPicker:false });
        $('.yes').click(function(){
            $('.member_id').hide();
        });
        $('.no').click(function(){
            $('.member_id').show();
        });
    });
</script>